home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / BOLEUI32.PAK / OLE2UI.H < prev   
Encoding:
C/C++ Source or Header  |  1997-05-06  |  5.2 KB  |  176 lines

  1. /*
  2.  * ole2ui.h
  3.  *
  4.  * Published definitions, structures, types, and function prototypes for the
  5.  * OLE 2.0 User Interface support library.
  6.  *
  7.  */
  8. /*
  9.  *      C/C++ Run Time Library - Version 6.5
  10.  *
  11.  *      Copyright (c) 1994 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16. #ifndef _OLE2UI_H_
  17. #define _OLE2UI_H_
  18.  
  19. #ifndef RC_INVOKED
  20. #include <windows.h>
  21. #include <shellapi.h>
  22. #include <ole2.h>
  23. #include <string.h>
  24.  
  25. #ifdef _TCHAR_DEFINED
  26. #define __TCHAR_DEFINED
  27. #endif
  28. #include <oledlg.h>
  29.  
  30. #ifndef _BOLESTD_H_ 
  31. #include "BOleStd.h"
  32. #endif 
  33. #endif // !RC_INVOKED
  34.  
  35. #if !defined( EXPORT )
  36. #ifdef WIN32
  37. #define EXPORT
  38. #else
  39. #define EXPORT  __export
  40. #endif  // WIN32
  41. #endif  // !EXPORT
  42.  
  43.  
  44. extern HINSTANCE  ghInst;
  45.  
  46. /*
  47.  * Initialization / Uninitialization routines.  OleUIInitialize
  48.  * must be called prior to using any functions in OLE2UI, and OleUIUnInitialize
  49.  * must be called before you app shuts down and when you are done using the
  50.  * library.
  51.  *
  52.  * NOTE:  If you are using the DLL version of this library, these functions
  53.  * are automatically called in the DLL's LibMain and WEP, so you should
  54.  * not call them directly from your application.
  55.  */
  56.  
  57. #ifndef RC_INVOKED
  58.  
  59. // Backward compatibility with older library
  60. #define OleUIUninitialize OleUIUnInitialize
  61.  
  62. STDAPI_(BOOL) OleUIInitialize(HINSTANCE hInstance, HINSTANCE hPrevInst);
  63. STDAPI_(BOOL) OleUIUninitialize(void);
  64.  
  65. #endif // !RC_INVOKED
  66.  
  67. extern UINT       cfObjectDescriptor;
  68. extern UINT       cfLinkSrcDescriptor;
  69. extern UINT       cfEmbedSource;
  70. extern UINT       cfEmbeddedObject;
  71. extern UINT       cfLinkSource;
  72. extern UINT       cfOwnerLink;
  73. extern UINT       cfFileName;
  74.  
  75. #define ID_PU_LINKS       900   // IDC_PU_LINKS
  76.  
  77. /*************************************************************************
  78. ** OLE OBJECT FEEDBACK EFFECTS
  79. *************************************************************************/
  80.  
  81. #ifndef RC_INVOKED
  82.  
  83. #define OLEUI_HANDLES_USEINVERSE    0x00000001L
  84. #define OLEUI_HANDLES_NOBORDER      0x00000002L
  85. #define OLEUI_HANDLES_INSIDE        0x00000004L
  86. #define OLEUI_HANDLES_OUTSIDE       0x00000008L
  87.  
  88.  
  89. #define OLEUI_SHADE_FULLRECT        1
  90. #define OLEUI_SHADE_BORDERIN        2
  91. #define OLEUI_SHADE_BORDEROUT       3
  92.  
  93. /* objfdbk.c function prototypes */
  94. STDAPI_(void) OleUIDrawHandles(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cSize, BOOL fDraw);
  95. STDAPI_(void) OleUIDrawShading(LPRECT lpRect, HDC hdc, DWORD dwFlags, UINT cWidth);
  96. STDAPI_(void) OleUIShowObject(LPCRECT lprc, HDC hdc, BOOL fIsLink);
  97.  
  98. //Metafile utility functions
  99. STDAPI_(void)    OleUIMetafilePictIconFree(HGLOBAL);
  100.  
  101. #endif // !RC_INVOKED
  102.  
  103. /*************************************************************************
  104. ** Hatch window definitions and prototypes                              **
  105. *************************************************************************/
  106.  
  107. #ifndef RC_INVOKED
  108.  
  109. #define DEFAULT_HATCHBORDER_WIDTH   4
  110.  
  111. STDAPI_(BOOL) RegisterHatchWindowClass(HINSTANCE hInst);
  112. STDAPI_(HWND) CreateHatchWindow(HWND hWndParent, HINSTANCE hInst);
  113. STDAPI_(UINT) GetHatchWidth(HWND hWndHatch);
  114. STDAPI_(void) GetHatchRect(HWND hWndHatch, LPRECT lpHatchRect);
  115. STDAPI_(void) SetHatchRect(HWND hWndHatch, LPRECT lprcHatchRect);
  116. STDAPI_(void) SetHatchWindowSize(
  117.       HWND        hWndHatch,
  118.       LPRECT      lprcIPObjRect,
  119.       LPRECT      lprcClipRect,
  120.       LPPOINT     lpptOffset
  121. );
  122.  
  123.  
  124. //Hook type used in all structures.
  125. typedef UINT (CALLBACK *LPFNOLEUIHOOK)(HWND, UINT, WPARAM, LPARAM);
  126.  
  127. //API prototype
  128. STDAPI_(UINT) OleUIInsertControl(LPOLEUIINSERTOBJECT);
  129.  
  130. #endif // !RC_INVOKED
  131.  
  132. //Standard error definitions
  133. #define BOLEUI_FALSE                     0
  134. #define BOLEUI_SUCCESS                   1     //No error, same as BOLEUI_OK
  135. #define BOLEUI_OK                        1     //OK button pressed
  136. #define BOLEUI_CANCEL                    2     //Cancel button pressed
  137.  
  138. #define BOLEUI_ERR_STANDARDMIN           100
  139. #define BOLEUI_ERR_STRUCTURENULL         101   //Standard field validation
  140. #define BOLEUI_ERR_STRUCTUREINVALID      102
  141. #define BOLEUI_ERR_CBSTRUCTINCORRECT     103
  142. #define BOLEUI_ERR_HWNDOWNERINVALID      104
  143. #define BOLEUI_ERR_LPSZCAPTIONINVALID    105
  144. #define BOLEUI_ERR_LPFNHOOKINVALID       106
  145. #define BOLEUI_ERR_HINSTANCEINVALID      107
  146. #define BOLEUI_ERR_LPSZTEMPLATEINVALID   108
  147. #define BOLEUI_ERR_HRESOURCEINVALID      109
  148.  
  149. #define BOLEUI_ERR_FINDTEMPLATEFAILURE   110   //Initialization errors
  150. #define BOLEUI_ERR_LOADTEMPLATEFAILURE   111
  151. #define BOLEUI_ERR_DIALOGFAILURE         112
  152. #define BOLEUI_ERR_LOCALMEMALLOC         113
  153. #define BOLEUI_ERR_GLOBALMEMALLOC        114
  154. #define BOLEUI_ERR_LOADSTRING            115
  155.  
  156. #define BOLEUI_ERR_STANDARDMAX           116   //Start here for specific errors.
  157.  
  158. //Dialog Identifiers as passed in Help messages to identify the source.
  159. #define IDD_INSERTCONTROL       32265
  160.  
  161. //Help Button Identifier
  162. #define ID_OLEUIHELP                    99
  163. #define IDOK    1
  164. #define IDCANCEL 2
  165.  
  166.  
  167. //Insert Object Dialog identifiers
  168. #define ID_IO_OBJECTTYPELIST            2103
  169. #define ID_IO_RESULTTEXT                2109
  170. #define ID_IO_FILETYPE                  2113
  171.  
  172. //Length of the CLSID string
  173. #define OLEUI_CCHCLSIDSTRING            39
  174.  
  175. #endif  //_BOLEUI_H_
  176.